home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Demos / Component Software / FileFlex 2.0.3.sit / FileFlex 2.0.3 / FileFlex-Director / FileFlex Xtras / -Database Designer / 00005_createButtonHandler.ls < prev    next >
Encoding:
Text File  |  1997-08-18  |  1.2 KB  |  49 lines

  1. on doCreateOK
  2.   global fieldSpec
  3.   if the optionDown then 
  4.     put TRUE into doAgain
  5.   else
  6.     put FALSE into doAgain
  7.   end if
  8.   if field "FieldEntry" = EMPTY or field "FieldEntry" = "_" then
  9.     beep
  10.   else
  11.     put item 2 of fieldSpec into theType
  12.     put field "FieldEntry" into theField
  13.     put the number of chars of theField into theNum
  14.     delete char theNum of theField
  15.     repeat with i = 1 to the number of lines of field "masterNameList"
  16.       if line i of field "MasterNameList" = theField then
  17.         beep
  18.         exit
  19.       end if
  20.     end repeat
  21.     put theField into item 1 of fieldSpec
  22.     hideDefineField
  23.     putFieldInfo
  24.     if doAgain then
  25.       put EMPTY into item 1 of fieldSpec
  26.       case (theType) of
  27.         "C": set panel to "text"
  28.         "N": set panel to "numeric"
  29.         "D": set panel to "date"
  30.         "L": set panel to "boolean"
  31.         "M": set panel to "memo"
  32.       end case
  33.       showDefineField panel
  34.     end if
  35.   end if
  36. end doCreateOK
  37.  
  38. on doCreateCancel
  39.   global fieldSpec
  40.   put EMPTY into fieldSpec
  41.   hideDefineField
  42. end doCreateCancel
  43.  
  44. on showSpriteLoc
  45.   repeat with i = 1 to 48
  46.     put i & ":" && the loc of sprite i
  47.   end repeat
  48. end showSpriteLoc
  49.